# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=cloudflare-enum
pkgver=10.412387f
pkgrel=4
groups=('blackarch' 'blackarch-scanner')
pkgdesc='Cloudflare DNS Enumeration Tool for Pentesters.'
arch=('any')
url='https://github.com/mandatoryprogrammer/cloudflare_enum'
license=('custom:unknown')
makedepends=('git')
depends=('python2' 'python2-simplejson' 'python2-requests'
         'python2-beautifulsoup4')
source=("$pkgname::git+https://github.com/mandatoryprogrammer/cloudflare_enum.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's|env python|env python2|' cloudflare_enum.py
}

package() {
  cd $pkgname

  install -Dm 755 cloudflare_enum.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

